package org.glow.changgou.content.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.glow.changgou.content.feign.ContentFeign;
import org.glow.changgou.content.mapper.ContentMapper;
import org.glow.changgou.content.pojo.Content;
import org.glow.changgou.content.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Glow
 * @Date 2022-09-26 19:38:19
 * @Description
 * @Version 1.0
 */
@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> implements ContentService {
    @Autowired
    private ContentService contentService;
    @Override
    public List<Content> findByCategory(Long id) {
        LambdaQueryWrapper<Content> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Content::getId,id);
        queryWrapper.eq(Content::getStatus,1);
        return contentService.list(queryWrapper);
    }
}
